<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>DFS | <?php
	if($page== 'About Us'){
		print("Home");
	}
	elseif($page== 'search'){
		print("Search");
	}
	elseif($page== 'Account'){
		print("My Account");
	}
	elseif($page== "Locations_Contact"){
		print("Locations and Contact Information");
	}
	elseif($page== "Dining Room" || $page== "Kitchen" || $page== "Islands and Misc."){
		print("Furniture");
	}
	elseif($page== "Edit Item"){
		print("Edit Item");
	}
	elseif($page== "Admin"){
		print("Admin");
	}
	elseif($page== 'Wishlist'){
		print("Wish List");
	}
	?></title>
	<link rel="stylesheet" type="text/css" href="css/styles.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<!--<script type="text/javascript" src="js/corner.js"></script>-->
	<script type="text/javascript" src="js/header.js"></script>
	<?php
		if ($page=='search'){	
			print("<script type=\"text/javascript\" src=\"js/search.js\"></script>");
		}
		//if ($page=='Wishlist') 	{ 	print("<script type=\"text/javascript\" src=\"js/wishlist.js\"></script>"); 	} 
	?>

	<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
	<script type="text/javascript" src="js/jquery-easing-1.3.pack.js"></script>
	<script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"></script>
	<script type="text/javascript" src="js/coda-slider.1.1.1.pack.js"></script>
	
	<script type="text/javascript">
	
		var theInt = null;
		var $crosslink, $navthumb;
		var curclicked = 0;
		
		theInterval = function(cur){
			clearInterval(theInt);
			
			if( typeof cur != 'undefined' )
				curclicked = cur;
			
			$crosslink.removeClass("active-thumb");
			$navthumb.eq(curclicked).parent().addClass("active-thumb");
				$(".stripNav ul li a").eq(curclicked).trigger('click');
			
			theInt = setInterval(function(){
				$crosslink.removeClass("active-thumb");
				$navthumb.eq(curclicked).parent().addClass("active-thumb");
				$(".stripNav ul li a").eq(curclicked).trigger('click');
				curclicked++;
				if( 4 == curclicked )
					curclicked = 0;
				
			}, 3000);
		};
		
		$(function(){
			
			$("#main-photo-slider").codaSlider();
			
			$navthumb = $(".nav-thumb");
			$crosslink = $(".cross-link");
			
			$navthumb
			.click(function() {
				var $this = $(this);
				theInterval($this.parent().attr('href').slice(1) - 1);
				return false;
			});
			
			theInterval();
		});
	</script>
</head>

<body>
<div class="header" id="headerdiv">
<a id="top"></a>
<!-- <span><img class="header_img" src="images/slideshow.jpeg" alt="Slideshow Placeholder" height="118" width="442" /></span>-->
<span><a href="index.php"><img class="header_img" src="images/logo.jpg" alt="Dining Furniture Showroom" height="118" width="279" /></a></span><div id="slideshow">
    <img src="images/slideshow.jpeg" alt="Slideshow Image" height="118" width="442" class="active" />
	<img src="images/slideshow1.jpeg" alt="Slideshow Image" height="118" width="442" />
    <img src="images/slideshow2.jpeg" alt="Slideshow Image" height="118" width="442" />
    <img src="images/slideshow3.jpeg" alt="Slideshow Image" height="118" width="442" />
    <img src="images/slideshow4.jpeg" alt="Slideshow Image" height="118" width="442" />
</div><!-- Eventually add Ken Burns effect? Fix this so the image doesn't reload every time the page changes? -->

<?php
	if(isset($_SESSION['user'])){
		if($_SESSION['user']){
			//Give the user links to logout, manage their account, and access their wish list
			print("<div class=\"header_links\">Welcome, ".$_SESSION['user']."<br/><a class=\"header_links_colors\" href=\"useracct.php\">Manage Account</a> | ");
			echo '<a class="header_links_colors" href="wishlist.php">View Wishlists</a> | ';
			echo '<a class="header_links_colors" href="useracct.php?logout=1">Log Out</a><br/><br/>';
		}
	}
	else{
	echo'<div class="header_form"><form action="useracct.php" method="post"><div class="inline">
			<input type="hidden" name="form" value="2"/>
			<input type="text" name="email" value="Username" size="12" onfocus="this.value = \'\';" />
			<input type="password" name="password" value="Password" size="8" onfocus="this.value = \'\';" /><input type="hidden" name="form" value="2"/><input 
			type="submit" name="login_button" value="Login" />
		</div></form>';
	echo '<a id= "header" class="header_links_colors" href="useracct.php">Create Account</a><br/><br/>';
	}
?>
<form action="search.php" method="get"><div class="inline"><input type="text" name="search_query" size="20" />
	<input type="hidden" name="queryModified" value="0"/>
	<input id="search_button" type="submit" name="search_button" value="Search" />
</div></form></div>
</div>